1. Field of the Invention
The present invention relates to an image retouching method, apparatus, and program storage medium storing an image retouching program, an image correcting method, apparatus, and program storage medium storing an image correcting program, an eye detecting and correcting method, apparatus, and program storage medium storing an eye detecting and correcting program, in which local flaws such as scratches, red-eye, and closed eyes in an original image are corrected according to image data that represents the original image.
2. Description of the Related Art
Along with the widespread use of digital still cameras, the area of photography has speeded toward digitalization. The digitalization has an advantage in that photographs can be electronically processed to correct imperfections in color or exposure. Software tools, called photo retouch software, for retouching photographs on a personal computer have also become widely available.
Furthermore, techniques have been proposed that correct local defects in images, such as scratches in an image, a dark, back-lighted main subject, the red or gold-eye effect, which is a red or gold appearance of the pupils of a person in a picture taken with a photographic flash, or eyes closed or a mouth opened during shooting. For example, in Patent Document 1 describes a technique concerning correction of red-eye. Such a defect affects profoundly the appearance of photographs and frequently occurs in pictures taken by amateur photographers. Therefore their correction is demanded especially in the field of photography.
One of the simplest approaches to locating a flaw to be corrected in a picture may be one in which a user uses photo retouch software to visually checks the picture to identify the flaw. However, it is inefficient to consciously check every picture. Low efficiencies pose an acute problem for commercial photo laboratories that print out digital photographs.
To solve the problem, techniques for automatically detecting defects in a picture have been proposed. For example, Patent Document 2 describes a method for detecting red-eye. Such automatic detection can be used to correct a detected defect, thereby automating the process from detection to correction.    [Patent Document 1]
Japanese Patent Laid-Open No. 2000-76427    [Patent Document 2]
Japanese Patent Laid-Open No. 2001-61071
However, such automatic detection cannot always accurately detect a defect. Especially when different corrections are to make to different types of defects, an erroneous detection may result in an erroneous correction, thereby degrading the picture quality.
Moreover, it takes enormous processing time to perform defect detection and correction according to the conventional techniques on a personal computer. For example, template matching may take several seconds per image in image data consisting of 1,500×1,000 pixels. Such long processing time make it impracticable to incorporate such a defect detection and correction function according to such conventional technique into laboratory devices for generating photo prints from photo film at a photo shop, for example.
Moreover, conventional automatic detection and correction cannot adequately correct defects. For example, when one of the eyes of a person is corrected or the eyes of one person among a number of people are corrected, the corrected eye or eyes may give an odd impression.
These defects are not limited to the field of photography. It may occur in any fields in which techniques for detecting and correcting local defects in images are used.
An object of the present invention is to provide an image retouching method, apparatus, and program storage medium storing an image retouching program that can improve the accuracy of defect correction without sacrificing efficiency, an image correcting method, apparatus, and program storage medium storing an image correcting program that can reduce processing time, and an eye detecting and correcting method, apparatus, and program storage medium storing an eye detecting and correcting program that can properly correct a defect in eyes in images.